function register() {
    let username = $("#username").val();
    let email = $("#inputEmail").val();
    let password = $("#inputPassword").val();
    let okPassword = $("#okPassword").val();
    if (password!==okPassword){
        $("#okPassword").after("<p class='text-monospace' style='color: red'>两次输入秘密不一致</p>")
    }
    $(".text-monospace").empty();
    $.post("/register",{"username":username,"email":email,"password":password},function (data) {
           if (data===1){
               window.location.href="/html/login.html";
           } else {
               $("#okPassword").after("<p class='text-monospace' style='color: red'>注册失败</p>")
           }
    },"json")
}